package com.eorchis.module.trainingplan.service;
import java.io.InputStream;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import org.apache.poi.ss.usermodel.Sheet;

import com.eorchis.core.service.IBaseService;
import com.eorchis.module.classplanapply.ui.commond.ClassPlanApplyQueryCommond;
import com.eorchis.module.trainingplan.domain.ClassPlanApplyQueryBean;
import com.eorchis.module.trainingplan.domain.TrainingPlanApplyContrast;
import com.eorchis.module.trainingplan.domain.TrainingPlanBean;
import com.eorchis.module.trainingplan.domain.yearlyPlanExport;
import com.eorchis.module.trainingplan.ui.commond.TrainingPlanFileValidCommond;
import com.eorchis.module.trainingplan.ui.commond.TrainingPlanFileZZBValidCommond;
import com.eorchis.module.trainingplan.ui.commond.TrainingPlanQueryCommond;
import com.eorchis.module.trainingplan.ui.commond.TrainingPlanValidCommond;
import com.eorchis.util.excel.ExcelImportResult;
/**
 * Title: ITrainingPlanService<br>
 * Description: 培训计划管理业务接口<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-07-12
 * @version $Revision$
 */
public interface ITrainingPlanService 
			extends IBaseService 
				
{

	public TrainingPlanValidCommond findTrainingPlan(TrainingPlanValidCommond vCommond);
	
	/**
	 * 查看培训计划归档
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public TrainingPlanFileValidCommond findTrainingPlan(TrainingPlanFileValidCommond vCommond) ;
	
	/**
	 * @category 获取导入结果
	 * @param is
	 * @return
	 * @throws Exception
	 */
	public ExcelImportResult divideImportExcelPlanSheet(Sheet sheet, String applyNum,HttpServletRequest request);
	
	/**
	 * 根据部门名称查找部门ID
	 * @Date 2016-08-08
	 * */
	public String findAdminDeptId(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 判断计划是否可以撤回
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public Boolean judgePlanWithdraw(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 判断计划是否可以删除
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public Boolean judgePlanDelete(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 判断计划是否可以驳回
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public Boolean judgePlanReject(TrainingPlanQueryCommond queryCommond);
	
	
	/**
	 *更新培训计划
	 *@author RongSL
	 *@Date 2016-07-13 
	 * */
	public void updateTrainingPlanValid(TrainingPlanValidCommond vCommond);
		
	/**
	 * @category 获取导入结果
	 * @param is
	 * @return
	 * @throws Exception
	 */
	public ExcelImportResult divideImportExcelPlan(InputStream is, HttpServletRequest request) throws Exception;
	
	/**
	 * 更新计划归档表
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public void updatePlanFile(TrainingPlanFileValidCommond ValidCommond,String array);
	/**
	 * 更新计划归档表
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public void updatePlanFile(TrainingPlanFileZZBValidCommond ValidCommond,String array);
	/**
	 * 塞值
	 * @Date 2016-7-19
	 * @author RongSL
	 * */
	public TrainingPlanBean ValidCommondToTrainingPlanBean(TrainingPlanValidCommond tpv,TrainingPlanFileValidCommond tpf);
	
	/**
	 * 计划下发
	 * @author RongSL
	 * @Date 2016-07-21
	 * */
	public void planIssuedAdd(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 更新计划总人数
	 * @author RongSL
	 * @Date 2016-07-25
	 * */
	public void updatePlanNum(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 查看培训计划列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * */
	public List<TrainingPlanValidCommond> findPlanList(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 查看下发列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * */
	public List<TrainingPlanValidCommond> lookIssuedList(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 查看反馈意见列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * @return 
	 * */
	public List<TrainingPlanValidCommond> findFeedbackList(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 下发单位列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * */
	public List<TrainingPlanValidCommond> findIssuedList(TrainingPlanQueryCommond queryCommond);
	
	public List<ClassPlanApplyQueryBean> findClassPlanApplyQueryBeanList(ClassPlanApplyQueryCommond queryCommond);
	/**
	 * 查询所有培训班计划名额
	 * @author ZhouYG
	 * @createDate 2016-09-20
	 */
	public List<ClassPlanApplyQueryBean> findClassPlanApplyList(TrainingPlanQueryCommond queryCommond) throws Exception;
	/**
	 * 塞值
	 * @Date 2016-7-19
	 * @author RongSL
	 * */
	public List<TrainingPlanApplyContrast> classPlanApplyQueryBeanToTrainingPlanApplyContrast(List<ClassPlanApplyQueryBean> resultList1,List<ClassPlanApplyQueryBean> resultList2);
	
	/**
	 * 变更培训计划状态
	 * @author RongSL
	 * @Date 2016-07-28
	 * */
	public void updatePlanState(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 地方查看培训计划列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * */
	public List<TrainingPlanValidCommond> findPlanListDF(TrainingPlanQueryCommond queryCommond) ;
	
	/**
	 * 地方查看培训计划列表
	 * @Date 2016-07-25
	 * @author RongSL
	 * */
	public List<TrainingPlanValidCommond> findPlanListBW(TrainingPlanQueryCommond queryCommond) ;
	
	/**
	 * 删除计划相关数据
	 * @Date 2016-07-31
	 * */
	public void deletePlanOther(TrainingPlanQueryCommond queryCommond);
	
	/**
	 * 更新培训计划名额
	 * @Date 2016-08-01
	 * */
	public void updatePlanApply(String... id);
	
	/**
	 * 判断有无培训计划
	 * */
	public boolean TrainingPlanSearch(TrainingPlanValidCommond vCommond);
	
	/**
	 * 获得培训计划最大编号
	 * @param deptCode 
	 * */
	public String getMaxApplyNum(String deptCode,Integer year);
	
	/**
	 * 获得培训班最大编号
	 * @param deptCode 
	 * */
	public String getMaxClassNum(String year);
	
	/**
	 * 查看培训计划中组部归档
	 * 
	 * @author RongSL
	 * @Date 2016-07-13
	 * */
	public TrainingPlanFileZZBValidCommond findTrainingPlan(TrainingPlanFileZZBValidCommond vCommond);
	
	/**
	 * 根据计划id查找地方部门id
	 * @author RongSL
	 * @date 2016-08-15
	 * */
	public String[] findDeptId(TrainingPlanValidCommond commond);
	
	/**
	 * 获得中组部下发时附加消息
	 * @author RongSL
	 * @Date 2016-09-05
	 * */
	public String getOpinion(TrainingPlanValidCommond commond);
	
	/**
	 *年度培训计划名额分配表
	 * @author RongSL
	 * @Date 2016-09-24
	 * */
	public List<yearlyPlanExport> ExportYearPlan(TrainingPlanQueryCommond queryCommond) throws Exception;
}
